package apof.model
{
	import mx.collections.ArrayCollection;
	
	public class Structure extends ApofModel
	{
		
		public var structureType:int=-1;
		
		public function get vuid():int{return structureType+400;}
		public function set vuid(value:int):void {this.structureType=value-400;}
		
		public function get radius():Number {return Math.sqrt(weight);}
		
		public var weight:Number=0;
		public var expense:Number=0;
		public var income:Number=0;
		
		public static function onInit():Boolean {
			var pt:Object=prototype;
			pt.classname="Structure";		
			pt.fields=["structureType","weight","income","expense"];
			pt.fieldTypes=["INT","NUMBER","NUMBER","NUMBER"];
			pt.primaryKey=["structureType"];
			pt.foreignKey={};
			return true;
		}
		
		public override function get classInfo():Object {return prototype;}
		public static function get classInfo():Object {return prototype;}	
	}
}